package cn.itcast.hotel.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "hotel_es_doc",shards = 3,replicas = 1)
public class HotelSDEDoc {

    @Field(type = FieldType.Long)
    private Long id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word",index = true)
    private  String name;

    @Field(type = FieldType.Double,index = true,store = true)
    private Integer price;
    @Field(type = FieldType.Keyword,index = true,store = true)
    private String brand;
    @Field(type = FieldType.Keyword,index = true,store = true)
    private String city;

}
